<template>
	<view class="current_color">
		<u-parse :content="content" @navigate="navigate"></u-parse>
	</view>

</template>

<script>
	import uParse from "@/components/feng-parse/parse.vue"
	import {
		getNotice
	} from '@/pages/api/seek.js'
	export default {
		components: {
			uParse
		},
		data() {
			return {
				content: ''
			}
		},
		onLoad(options) {
			// options 参数包含了从上一个页面传递过来的数据  
			// 如果使用了 query 参数，可以通过 options.query 来获取  
			// 例如：url: '/pages/detail/detail?content=someContent'  
			console.log("onLoad") 
			console.log(options)
			const id = decodeURIComponent(options.id);
			console.log("id:" + id)
			this.loadNotice(id)
		},
		methods: {
			navigate(e) {
				console.log(e)
			},
			loadNotice(id) {
				console.log("loadNotice")
				getNotice(id).then(data => {
					this.content = data.noticeContent;
					console.log(this.content);
					// 处理数据...  
				}).catch(error => {
					console.error('Error fetching data with params:', error);
				});
			},
		}
	}
</script>

<style lang="scss">

</style>